package name.huzhenbo.java.objects;

class ImplementsInvalidEquals {

    private int number = 0;

    public ImplementsInvalidEquals(int number) {
        this.number = number;
    }

    public int getNumber() {
        return number;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof ImplementsInvalidEquals) {
            return this.number == ((ImplementsInvalidEquals) obj).getNumber();
        }
        return false;
    }

    // not extends hashcode
}
